package com.sihai.ehr.service;

import java.util.List;

import com.sihai.core.Limit;
import com.sihai.core.LimitedList;
import com.sihai.core.Sorter;
import com.sihai.ehr.model.biz.*;
import com.sihai.ehr.web.pojo.IdentityCardPojo;
import com.sihai.ehr.web.pojo.InterviewArrangePOJO;

/**
 * 招聘面试服务接口
 *
 * @author Henry-PC
 */
public interface InterviewService {

    /****************************************
     * --------------面试安排模块----------------
     ****************************************/

    /**
     * @param id
     * @return
     */
    InterviewArrange getInterviewArrange(Long id);

    /**
     * 员工安排查询
     *
     * @param organizationId
     * @param dutyId
     * @param limit
     * @param sorter
     * @return
     */
    LimitedList<InterviewArrangePOJO> searchInterviewArranges(Long organizationId,
                                                              Long dutyId, Limit limit, Sorter sorter);

    /**
     * 员工报到查询
     *
     * @param organizationId
     * @param dutyId
     * @param limit
     * @param sorter
     * @return
     */
    LimitedList<InterviewArrangePOJO> searchInterviewArrangesTOReport(Long organizationId,
                                                                      Long dutyId, Limit limit, Sorter sorter);

    /**
     * 员工识别证列表查询
     *
     * @param organizationId
     * @param dutyId
     * @param limit
     * @param sorter
     * @return
     */
    public LimitedList<IdentityCardPojo> searchInterviewArrangesTOIdentityCard(Long organizationId,
                                                                               Long dutyId, Limit limit, Sorter sorter);

    /**
     * @param interviewArrange
     * @param limit
     * @param sorter
     * @return
     */
    LimitedList<InterviewArrange> searchInterviewArranges(
            InterviewArrange interviewArrange, Limit limit, Sorter sorter);

    /**
     * @param interviewArrange
     */
    void saveInterviewArrange(InterviewArrange interviewArrange);

    /**
     * @param interviewArrangeIds
     */
    void removeInterviewArrange(String interviewArrangeIds);

    /****************************************
     * --------------初试模块----------------
     ****************************************/

    /**根据安排编号获取初度结果
     * @param id
     * @return
     */
    InterviewFirst getInterviewFirst(Long id);

    /**
     * @param interviewArrangeId
     * @param limit
     * @param sorter
     * @return
     */
    List<InterviewFirst> searchInterviewFirsts(Long interviewArrangeId,
                                               Limit limit, Sorter sorter);

    /**
     * @param interviewFirst
     * @param limit
     * @param sorter
     * @return
     */
    LimitedList<InterviewFirst> searchInterviewFirsts(
            InterviewFirst interviewFirst, Limit limit, Sorter sorter);


    /**
     * 保存初试面试结果
     *
     * @param interviewFirst
     * @param dutyId
     * @param orgId
     */
    void saveInterviewFirst(InterviewFirst interviewFirst, Long dutyId, Long orgId);

    /**
     * @param interviewFirstIds
     */
    void removeInterviewFirsts(String interviewFirstIds);

    /****************************************
     * --------------复试模块----------------
     ****************************************/

    /**
     * @param id
     * @return
     */
    InterviewRetrial getInterviewRetrial(Long id);

    /**
     * @param interviewArrageId
     * @param limit
     * @param sorter
     * @return
     */
    List<InterviewRetrial> searchInterviewRetrials(Long interviewArrageId,
                                                   Limit limit, Sorter sorter);

    /**
     * @param interviewRetrial
     * @param limit
     * @param sorter
     * @return
     */
    LimitedList<InterviewRetrial> searchInterviewRetrials(
            InterviewRetrial interviewRetrial, Limit limit, Sorter sorter);

    /**
     * 保存复试结果记录
     * @param interviewRetrial
     * @param dutyId
     * @param orgId
     */
    void saveInterviewRetrial(InterviewRetrial interviewRetrial, Long dutyId, Long orgId);

    /**
     * @param interviewRetrialIds
     */
    void removeInterviewRetrial(String interviewRetrialIds);

    /**
     * *************************************
     * --------------审核模块----------------
     * **************************************
     */

    Auditing getAuditing(Long id);

    List<Auditing> searchAuditings(Long interViewArrageId, Limit limit,
                                   Sorter sorter);

    LimitedList<Auditing> searchAuditings(Auditing auditing, Limit limit,
                                          Sorter sorter);

    void saveAuditing(Auditing auditing);

    void removeAuditing(String auditingIds);

    /**
     * *************************************
     * --------------识别卡模块----------------
     * **************************************
     */
    
    /**
     * 根据员工编号获取识别卡信息
     * @param id
     * @param arrangeId
     * @return
     */
    public IdentificationCard queryIdentityCardByEmployeeId(Long id,Long arrangeId);

    /**
     * 根据面试安排编号获取识别卡
     * @param id
     * @return
     */
    IdentificationCard queryIdentityCardByViewArrangeId(Long id);

    /**
     * 保存识别卡信息
     * @param identificationCard
     */
    void saveIdentificationCard(IdentificationCard identificationCard);
}
